<template>
  <div class="box">
    <el-popover
      placement="top"
      width="200"
      v-model="visible">
      <p>请选择下载类型，下载全部或是下载当前查询的数据？</p>
      <div>
        <el-button size="mini" type="warning" @click="downLoadAll" style="display: inline-block">下载全部</el-button>
        <el-button type="success" size="mini" @click="downLoadQuery" style="display: inline-block">下载当前数据</el-button>
      </div>
      <el-button size="mini" type="success" class="el-icon-download" slot="reference"></el-button>
    </el-popover>
  </div>
</template>

<script>
export default {
  name: "excelDownLoad",
  props: {

  },
  data() {
    return {
      visible: false,
    }
  },
  methods: {
    downLoadAll() {
      this.visible = false
      this.$emit("downLoadAll")
    },
    downLoadQuery() {
      this.visible = false
      this.$emit("downLoadQuery")
    },
  }
}
</script>

<style scoped>
.box {
  display: inline-block;
}
</style>
